<?php

namespace App\Models;


class SendVerifyCodeLog extends BaseModel
{
    /**
     * 关联到模型的数据表
     *
     * @var string
     */
    protected $table = 'send_verify_code_log';

    /**
     * @var string
     */
    protected $primaryKey = 'id';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'phone', 'code', 'channel', 'request','describe', 'type', 'is_backend'
    ];

    /**
     * 发送验证码的用户
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     */
    public function smsLogUser(){
        return $this->hasOne(User::class, 'phone', 'phone');
    }
}
